Contents
  1. 1. Install homebrew
    1. 1.1. Install brew cask
      1. 1.1.1. Install nodejs and git with brew cask
  2. 2. Install hexo3
    1. 2.1. Configuration
      1. 2.1.1. Change the theme
      2. 2.1.2. Configure the _config.yml
      3. 2.1.3. Extensions and Plugins
      4. 2.1.4. Write and publish your articles
  3. 3. Enjoy

This is a deployment in MAC, but the most parts are also fit for Windows and Linux

Install homebrew

(This is a package manager of the OSX, which would be familiared if you ever used linux like Ubuntu)

1
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Install brew cask

(It’s a binary package manger)

1
$ brew install caskroom/cask/brew-cask

Install nodejs and git with brew cask

1
$ brew cask install node git

Install hexo3

1
2
3
4
$ sudo npm install hexo-cli -g
$ hexo init blog
$ cd blog
$ npm install

Configuration

Change the theme

Recommend the Jacman, you can get details in his documents.

Configure the _config.yml

This is the configure file of hexo which locate in the root directory of blog fold

You need to modificate these two below

1
2
3
4
5
6
7
8
9
10
11
12
# Site
title: # Your blog's name
subtitle:
description:
author: # Your name
language:
timezone:
# Deployment
deploy:
type: # git or others
repository: # git@github.com:yourname/yourname.github.io.git
branch: master

Extensions and Plugins

As default, Hexo3 doesn’t have Git and RSS plugins, so try these two commands below to install them

1
2
$ npm install hexo-deployer-git --save
$ npm install hexo-generator-feed --save

For more plugins, go to this site

Write and publish your articles

You can write articles in markdown editor(recommend Macdown or Sublime Text3) and put them in blog/source/_posts fold

You can use these commands below to preview or publish

1
2
$ hexo server # Preview
$ hexo g -d # Generate and deploy(Publish)

If you get the erro like “Cannot find module ‘./build/default/DTraceProviderBindings’”, try

1
$ npm install hexo --no-optional

You can find more other detailes in This

Enjoy

Contents
  1. 1. Install homebrew
    1. 1.1. Install brew cask
      1. 1.1.1. Install nodejs and git with brew cask
  2. 2. Install hexo3
    1. 2.1. Configuration
      1. 2.1.1. Change the theme
      2. 2.1.2. Configure the _config.yml
      3. 2.1.3. Extensions and Plugins
      4. 2.1.4. Write and publish your articles
  3. 3. Enjoy